import http from './http'

// 获取商品页面banner图
const getCommBanner = (name) => {
    return http.post(
        '/api/courseApi/getBannerByCateName',
        {name:name},
        {headers:{act: 'getBannerByCateName'}}
    )
}

// 获取分类
const getCates = (id) => {
    return http.post(
        '/api/Goods/getCates',
        {classify_id:id},
        { headers: { act: 'getVideoDetail' } }
    )
}
// 获取商品列表
const getGoodsByCate = (id, limit,page) => {
    return http.post(
        '/api/Goods/getGoodsByCate',
        {id,limit,page},
        {headers:{act: 'getVideoDetail'}}
    )
}
export {
    getCommBanner,
    getCates,
    getGoodsByCate
}